home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / What's New? / Development Kits / ColorSync™ 2.0.1 GM / Interfaces / CIncludes / CMConversions.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-12  |  4.8 KB  |  142 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        CMConversions.h
  3.  
  4.      Contains:    ColorSync base <-> derived color space conversion Component interface
  5.  
  6.      Version:    Technology:    ColorSync 2.0
  7.                  Release:    2.0f3
  8.  
  9.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, send the file and version
  13.                  information (from above) and the problem description to:
  14.  
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __CMCONVERSIONS__
  21. #define __CMCONVERSIONS__
  22.  
  23.  
  24. #ifndef __TYPES__
  25. #include <Types.h>
  26. #endif
  27. /*    #include <ConditionalMacros.h>                                */
  28.  
  29. #ifndef __COMPONENTS__
  30. #include <Components.h>
  31. #endif
  32. /*    #include <MixedMode.h>                                        */
  33.  
  34. #ifndef __CMAPPLICATION__
  35. #include <CMApplication.h>
  36. #endif
  37. /*    #include <Quickdraw.h>                                        */
  38. /*        #include <QuickdrawText.h>                                */
  39. /*            #include <ScriptLayout.h>                            */
  40. /*    #include <Files.h>                                            */
  41. /*        #include <OSUtils.h>                                    */
  42. /*            #include <Memory.h>                                    */
  43. /*        #include <Finder.h>                                        */
  44. /*    #include <Printing.h>                                        */
  45. /*        #include <Errors.h>                                        */
  46. /*        #include <Dialogs.h>                                    */
  47. /*            #include <Windows.h>                                */
  48. /*                #include <Events.h>                                */
  49. /*                #include <Controls.h>                            */
  50. /*                    #include <Collections.h>                    */
  51. /*                    #include <Appearance.h>                        */
  52. /*                    #include <TextObjects.h>                    */
  53. /*                        #include <Unicode.h>                    */
  54. /*                    #include <Menus.h>                            */
  55. /*                #include <AppleEvents.h>                        */
  56. /*                    #include <EPPC.h>                            */
  57. /*                        #include <AppleTalk.h>                    */
  58. /*                        #include <PPCToolbox.h>                    */
  59. /*                        #include <Processes.h>                    */
  60. /*                    #include <Notification.h>                    */
  61. /*                        #include <Kernel.h>                        */
  62. /*                            #include <MachineExceptions.h>        */
  63. /*                            #include <Timing.h>                    */
  64. /*                #include <Drag.h>                                */
  65. /*                    #include <TextEdit.h>                        */
  66. /*    #include <CMICCProfile.h>                                    */
  67.  
  68. #ifdef __cplusplus
  69. extern "C" {
  70. #endif
  71.  
  72. #if GENERATINGPOWERPC
  73. #pragma options align=mac68k
  74. #endif
  75.  
  76. #ifdef __CFM68K__
  77. #pragma import on
  78. #endif
  79.  
  80.  
  81. enum {
  82.     CMConversionInterfaceVersion = 1
  83. };
  84.  
  85. /* Component function selectors */
  86. enum {
  87.     kCMXYZToLab                    = 0,
  88.     kCMLabToXYZ                    = 1,
  89.     kCMXYZToLuv                    = 2,
  90.     kCMLuvToXYZ                    = 3,
  91.     kCMXYZToYxy                    = 4,
  92.     kCMYxyToXYZ                    = 5,
  93.     kCMRGBToHLS                    = 6,
  94.     kCMHLSToRGB                    = 7,
  95.     kCMRGBToHSV                    = 8,
  96.     kCMHSVToRGB                    = 9,
  97.     kCMRGBToGRAY                = 10,
  98.     kCMXYZToFixedXYZ            = 11,
  99.     kCMFixedXYZToXYZ            = 12
  100. };
  101.  
  102. extern pascal ComponentResult CMXYZToLab(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  103.  FIVEWORDINLINE(0x2F3C, 16, 0, 0x7000, 0xA82A);
  104. extern pascal ComponentResult CMLabToXYZ(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  105.  FIVEWORDINLINE(0x2F3C, 16, 1, 0x7000, 0xA82A);
  106. extern pascal ComponentResult CMXYZToLuv(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  107.  FIVEWORDINLINE(0x2F3C, 16, 2, 0x7000, 0xA82A);
  108. extern pascal ComponentResult CMLuvToXYZ(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  109.  FIVEWORDINLINE(0x2F3C, 16, 3, 0x7000, 0xA82A);
  110. extern pascal ComponentResult CMXYZToYxy(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  111.  FIVEWORDINLINE(0x2F3C, 12, 4, 0x7000, 0xA82A);
  112. extern pascal ComponentResult CMYxyToXYZ(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  113.  FIVEWORDINLINE(0x2F3C, 12, 5, 0x7000, 0xA82A);
  114. extern pascal ComponentResult CMRGBToHLS(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  115.  FIVEWORDINLINE(0x2F3C, 12, 6, 0x7000, 0xA82A);
  116. extern pascal ComponentResult CMHLSToRGB(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  117.  FIVEWORDINLINE(0x2F3C, 12, 7, 0x7000, 0xA82A);
  118. extern pascal ComponentResult CMRGBToHSV(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  119.  FIVEWORDINLINE(0x2F3C, 12, 8, 0x7000, 0xA82A);
  120. extern pascal ComponentResult CMHSVToRGB(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  121.  FIVEWORDINLINE(0x2F3C, 12, 9, 0x7000, 0xA82A);
  122. extern pascal ComponentResult CMRGBToGray(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  123.  FIVEWORDINLINE(0x2F3C, 12, 10, 0x7000, 0xA82A);
  124. extern pascal ComponentResult CMXYZToFixedXYZ(ComponentInstance ci, const CMXYZColor *src, CMFixedXYZColor *dst, unsigned long count)
  125.  FIVEWORDINLINE(0x2F3C, 12, 11, 0x7000, 0xA82A);
  126. extern pascal ComponentResult CMFixedXYZToXYZ(ComponentInstance ci, const CMFixedXYZColor *src, CMXYZColor *dst, unsigned long count)
  127.  FIVEWORDINLINE(0x2F3C, 12, 12, 0x7000, 0xA82A);
  128.  
  129. #ifdef __CFM68K__
  130. #pragma import off
  131. #endif
  132.  
  133. #if GENERATINGPOWERPC
  134. #pragma options align=reset
  135. #endif
  136.  
  137. #ifdef __cplusplus
  138. }
  139. #endif
  140.  
  141. #endif /* __CMCONVERSIONS__ */
  142.